Exit error
The Exit error statement ends script execution and raises a user-defined script error.
Syntax:
Exit Error expression [(when | unless condition)]
Since Exit error is a control statement, it is ended by semicolon or end-of-line and must not cross a line boundary.
Arguments:
| Argument | Description |
|---|---|
| expression | A value that is evaluated and returned as the user-raised script error message. |
| when / unless condition | Optional condition. when raises the error when the condition is true. unless raises the error when the condition is false. |
Examples:
//Exit error
Exit Error 'Load validation failed';//Exit error when a condition is fulfilled
Exit Error 'Source connection unavailable' when vConnectionOk=0;//Exit error unless a condition is fulfilled
Exit Error 'Required variable is missing' unless len(trim(vRequiredVar))>0;